05. Random Nouns
Random Nouns
Question:
Start Quiz:
# Write code for the function random_noun, which takes in no inputs but outputs
# one of two nouns randomly. Use the randint function to generate a number
# from 0-1 and return a noun depending on whether the number is equal to 0 or 1.
# Feel free to experiment with different nouns, but for submission purposes return
# the string "sofa" if the number is 0, else return "llama".
from random import randint
def random_noun():
# your code here
Solution:
INSTRUCTOR NOTE:
Don't print anything out inside of random_noun(), as printing anything out inside of your random_noun() function definition will cause the grader to mark your solution as incorrect.